load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")

go_library(
    name = "ptcache",
    srcs = ["cache.go"],
    importpath = "github.com/cockroachdb/cockroach/pkg/kv/kvserver/protectedts/ptcache",
    visibility = ["//visibility:public"],
    deps = [
        "//pkg/kv/kvserver/protectedts",
        "//pkg/kv/kvserver/protectedts/ptpb",
        "//pkg/roachpb",
        "//pkg/settings/cluster",
        "//pkg/sql/isql",
        "//pkg/util/hlc",
        "//pkg/util/log",
        "//pkg/util/stop",
        "//pkg/util/syncutil",
        "//pkg/util/syncutil/singleflight",
        "//pkg/util/timeutil",
        "//pkg/util/uuid",
        "@com_github_cockroachdb_errors//:errors",
    ],
)

go_test(
    name = "ptcache_test",
    size = "medium",
    srcs = [
        "cache_test.go",
        "main_test.go",
    ],
    deps = [
        ":ptcache",
        "//pkg/base",
        "//pkg/keys",
        "//pkg/kv",
        "//pkg/kv/kvpb",
        "//pkg/kv/kvserver",
        "//pkg/kv/kvserver/protectedts",
        "//pkg/kv/kvserver/protectedts/ptpb",
        "//pkg/kv/kvserver/protectedts/ptstorage",
        "//pkg/roachpb",
        "//pkg/security/securityassets",
        "//pkg/security/securitytest",
        "//pkg/server",
        "//pkg/spanconfig",
        "//pkg/sql",
        "//pkg/sql/catalog/systemschema",
        "//pkg/sql/isql",
        "//pkg/testutils",
        "//pkg/testutils/serverutils",
        "//pkg/testutils/testcluster",
        "//pkg/util/hlc",
        "//pkg/util/leaktest",
        "//pkg/util/log",
        "//pkg/util/randutil",
        "//pkg/util/stop",
        "//pkg/util/syncutil",
        "//pkg/util/uuid",
        "@com_github_cockroachdb_errors//:errors",
        "@com_github_stretchr_testify//assert",
        "@com_github_stretchr_testify//require",
    ],
)
